<#if type == "select">
    <select class="form-control" id="${name}" name="${name}">
    <#list options as option>
        <option value="${option.code}" <#if option.code == _default>selected</#if>>${option.name}</option>
    </#list>
    </select>
</#if>
<#if type == "radio">
    <div class="radio">
    <#list options as option>
        <label><input type="radio" name="${name}" value="${option.code}" <#if option.code == _default>checked</#if> <#if required == "true">required</#if>/>${option.name}</label>
    </#list>
    </div>
</#if>